/*
 * Copyright 2010 - Jeremie Brebec
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package org.jb.coinche.client.business.model;

import java.io.Serializable;

public class Auction implements Serializable {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = -7911012620057736656L;
	
	/**
	 * 
	 * @author jeremie
	 *
	 */
	public enum CoincheMode {
		NORMAL,
		COINCHE,
		SURCOINCHE
	}
	
	/**
	 * @param value the value to set
	 */
	public void setValue(int value) {
		this.value = value;
	}
	/**
	 * @return the value
	 */
	public int getValue() {
		return value;
	}
	/**
	 * @param trump the trump to set
	 */
	public void setTrump(Trump trump) {
		this.trump = trump;
	}
	/**
	 * @return the trump
	 */
	public Trump getTrump() {
		return trump;
	}
	
	/**
	 * 
	 * @param player
	 */
	public void setPlayer( Player player ) {
		this.player = player;
	}
	
	/**
	 * 
	 * @return
	 */
	public Player getPlayer() {
		return player;
	}
	/**
	 * @return the team
	 */
	public Player.Team getTeam() {
		return player.getTeam();
	}
	
	/**
	 * 
	 * @return
	 */
	public CoincheMode getCoincheMode() {
		return mode;
	}
	
	/**
	 * 
	 * @param mode
	 */
	public void setCoincheMode( CoincheMode mode ) {
		this.mode = mode;
	}
	
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("Auction:");
		sb.append("Value=");
		sb.append(value);
		sb.append("/Trump=");
		sb.append(trump == null ? null : trump.toString());
		sb.append("/mode=");
		sb.append( mode.toString() );
		return sb.toString();
	}

	private int value;
	private Trump trump;
	private Player player;
	private CoincheMode mode = CoincheMode.NORMAL;
}